Skip to content

fix(agent-backup): isolate same-second snapshot directories (#3340) - #4399

Merged
dezren39 merged 2 commits into
mainfrom
queue/5943-3340-agentbackup-snapshot-uniq
Nov 2, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/5943-3340-agentbackup-snapshot-uniq

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

 backup.sh
-  STAMP=...; DEST="$ROOT/$STAMP"   # shared by same-second runs
+  mkdir "$DEST" (exclusive)
+  on collision: DEST="$ROOT/$STAMP-$(printf '%010d' N)"
+  no-change cleanup only removes the run's own exclusive dir
 test-backup.sh (new)
+  stubbed-date same-second pair + no-change control

Evidence

  • Before: two runs in the same second shared $ROOT/$STAMP; the second copied into and could rm -rf the first run's snapshot, leaving latest dangling (issue probe).
    After: bash pkgs/agent-backup/test-backup.sh — PASS (same-second pair keeps both snapshots, latest resolves; no-change run removes only its own dir).
  • bash -n, shellcheck --exclude=SC2250,SC2292, and git diff --check origin/main...HEAD all pass.

Merge Danger

Door: two-way (backup-script-only change, no consumers; revert restores old naming).

Blast Radius: single-script

Only pkgs/agent-backup/backup.sh behavior changes (snapshot dir naming under collision); normal single-run behavior is unchanged.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39 dezren39 added task/small-fix Queue packet kind: bounded fix with reproduction and targeted tests status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 2, 2026
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 15:05
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be983e02-d60d-4481-af74-928f3ae8f0e9
Commits

Reviewing files that changed from the base of the PR and between 2ab643e and eeb9a72.

Files selected for processing: 2
  • pkgs/agent-backup/backup.sh
  • pkgs/agent-backup/test-backup.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T15:07:47.367261Z eeb9a72 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), at 2026-11-02T15:06:17Z. event: implementation_complete; task: 5943; queue: repo-health-code-pilot. Branch queue/5943-3340-agentbackup-snapshot-uniq at b974eb6 + origin/main merge 2ab643e. Targeted shell regression and shellcheck pass; awaiting CI.

@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 2, 2026
@dezren39
dezren39 merged commit e28805a into main Nov 2, 2026
1 check passed
@dezren39
dezren39 deleted the queue/5943-3340-agentbackup-snapshot-uniq branch November 2, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

task/small-fix Queue packet kind: bounded fix with reproduction and targeted tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant